package com.atguigu.gulimall.gulimallauthserver.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.gulimallauthserver.feign.fallback.ThirdPartFeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 短信远程服务
 *
 * @author xiaoping
 * @create 2020/6/30 10:39
 * @since 1.0.0
 */
@FeignClient(value = "gulimall-third-party",fallback = ThirdPartFeignServiceFallBack.class)
public interface ThirdPartFeignService {

    /**
     * 获取短信验证码
     * @param phone
     * @param code
     * @return
     */
    @GetMapping("/sms/sendcode")
    R sendCode(@RequestParam("phone") String phone, @RequestParam("code") String code);
}
